package com.huawei;

import java.util.Random;
import java.util.Scanner;

public class Game {
    public static void main(String[] args) {

        int a = 0;

        int b = 0;

        Scanner sc = new Scanner(System.in);

        System.out.println("Rockpaperscissors Begin!!");
        System.out.println("1:scissors 2：rock 3：paper");


        for (int i = 1; i <= 5; i++) {

            System.out.println("第"+i+"局");
            int u = Integer.parseInt(sc.next());
            int computer = new Random().nextInt(2)+1;

            if (u == 1){
                System.out.println("u：scissors");
                if (computer == 1){
                    System.out.println("computer：scissors");
                    System.out.println("peace");
                }
                if (computer == 2){
                    System.out.println("computer：rock");
                    System.out.println("lose");
                    b++;
                }
                if (computer == 3){
                    System.out.println("computer：paper");
                    System.out.println("win");
                    a++;
                }
            }

            if (u == 2){
                System.out.println("u：rock");
                if (computer == 1){
                    System.out.println("computet：scissors");
                    System.out.println("win");
                    a++;
                }
                if (computer == 2){
                    System.out.println("computer：rock");
                    System.out.println("peace");
                }
                if (computer == 3){
                    System.out.println("computer：paper");
                    System.out.println("lose");
                    b++;
                }
            }

            if (u == 3){
                System.out.println("u：paper");
                if (computer == 1){
                    System.out.println("computer：scissors");
                    System.out.println("lose");
                    b++;
                }
                if (computer == 2){
                    System.out.println("computer：rock");
                    System.out.println("win");
                    a++;
                }
                if (computer == 3){
                    System.out.println("computer：paper");
                    System.out.println("peace");
                }
            }

        }

        if ( a + b == 0 ){
            System.out.println("peace");
        }

        if (a > b){
            System.out.println("win");
        }
        if (a < b){
            System.out.println("lose");
        }


    }
}
